package com.sharemarking.system.service;

import com.sharemarking.system.entity.Area;
import com.sharemarking.system.mapper.AreaMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("areaService")
public class AreaService {
	
	@Autowired
	private AreaMapper am;
	
	public String getByCode(String code) {
		Area area = am.get(code);
		System.out.println(area.getName());
		return area.getName()==null?"":area.getName();
	}

	public String getByName(String name) {
		return  am.getByName(name);
	}
}
